package com.zhxxfwzx.common.exception;

import com.zhxxfwzx.common.lang.RespBean;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Description TODO
 * @title: GlobalException
 * @Author LiJing
 * @Date: 2021/6/178:25 上午
 * @Version 1.0
 */
@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {

    public RespBean handler(RuntimeException e){
        log.error("运行时异常:-----------{}",e);
        return RespBean.error(e.getMessage());
    }

}
